/*
 * Copyright (C) 2018 Zhengzhou grandtech Technology CO.,LTD.
 * All rights reserved.
 * Official Web Site: http://www.grandtech.com.
 * Developer Web Site: http://open.grandtech.com.
 */
package com.grandtech.oss.filter;

import com.grandtech.oss.common.pojo.ThreadLocalHolder;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

/***
 * GlobalRequestMappingFilter
 * @author <a href="mailto:yanggh@foxmail.com">yanggh@foxmail.com</a>
 */
@Deprecated
public class GlobalRequestMappingFilter implements Filter {

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response,
                         FilterChain chain) throws IOException, ServletException {
        HttpServletRequest req = (HttpServletRequest) request;
        ThreadLocalHolder.setRequest(req);
        chain.doFilter(request, response);
    }

    @Override
    public void destroy() {

    }

}
